<include file="Public:header" />
<div class="container">
	<div class="page-header" style="border:none; font-size:14px; ">
		<ul class="nav nav-tabs">
			<li><a href="{:U('setting/sendsms')}">{:L('SEND_SMS')}</a></li>
			<li class="active"><a href="{:U('setting/smsrecord')}">{:L('SMS_RECORD')}</a></li>
			<li><a href="{:U('setting/sendemail')}">{:L('SEND_EMAIL')}</a></li>
		</ul>
	</div>
	<include file="Public:alert" />	
	<div class="row">	
		<div class="span12">
			<ul class="nav pull-left">
				<li class="pull-left">
					<form class="form-inline" id="searchForm" action="" method="get">
						<ul class="nav pull-left">
                        <li class="pull-left"><a id="delete"  class="btn" style="margin-right: 8px;"><i class="icon-remove"></i>{:L('DELETE')}</a></li>						
						<li class="pull-left" >
							<select style="width:auto" id="field" onchange="changeCondition()" name="field">
								<option class="word" value="">--{:L('PLEASE_CHOOSE')}--</option>
								<option class="word" value="telephone">{:L('RECEIVE_TELEPHONE')}</option>
								<option class="word" value="content">{:L('SEND_CONTENT')}</option>
								<option class="date" value="sendtime">{:L('SEND_SENDTIME')}</option>
							</select>&nbsp;&nbsp;
						</li>
						<li id="conditionContent" class="pull-left">
							<select id="condition" style="width:auto" name="condition" onchange="changeSearch()">
								<option value="contains">{:L('INCLUDE')}</option>
								<option value="not_contain">{:L('EXCLUSIVE')}</option>
								<option value="is">{:L('YES')}</option>
								<option value="isnot">{:L('ISNOT')}</option>				
								<option value="start_with">{:L('BEGINNING_CHARACTER')}</option>
								<option value="end_with">{:L('TERMINATION_CHARACTER')}</option>
								<option value="is_empty">{:L('Mandatory')}</option>
								<option value="is_not_empty">{:L('ISNOTEMPTY')}</option>
							</select>&nbsp;&nbsp;
						</li>
						<li id="searchContent" class="pull-left">
							<input id="search" type="text" class="input-medium search-query" name="search"/>&nbsp;&nbsp;
						</li>
						<li class="pull-left"> 
							<input type="hidden" name="act" id="act" value="search"/>
							<input type="hidden" name="m" value="setting"/>
							<input type="hidden" name="a" value="smsrecord"/>
							<if condition="$Think.get.by neq null"><input type="hidden" name="by" value="{$Think.get.by}"/></if>
							<button type="button" id="dosearch" class="btn"> <img src="__PUBLIC__/img/search.png"/>  {:L('SEARCH')}</button>
							&nbsp;
						</li>
						</ul>
					</form>
				</li>
			</ul>
			
		</div>
		<div class="span12">
			<form id="form1" action="" method="post">
				<table class="table table-hover  table-striped">
					<thead>
						<tr>
						    <th>
								<input class="check_all" id="check_all" type="checkbox" /> &nbsp;
							</th>
							<th> {:L('SEND_ROW_NAME')}</th>
							<th> {:L('RECEIVE_TELEPHONE')}</th>
							<th> {:L('SEND_CONTENT')}</th>
							<th> {:L('SEND_SENDTIME')}</th>
						</tr>
					</thead>
					<tfoot>
						<tr  >
							<td colspan="5" style="text-align:center">{$page}</td>
						</tr>
					</tfoot>
					<tbody>
					<notempty name="data">
						<volist name="data" id="vo">
							<tr>
								<td><input type="checkbox" class="check_list" name="record_id[]" value="{$vo.sms_record_id}"/> &nbsp;
								</td>
								<td>
								   {$vo.send_user}
								</td>
                                <td title="{$vo.telephone}">
								   {$vo.subtelephone}
								</td>
								<td>
								    <div title="{$vo.content}">{$vo.subcontent}</div>
								</td>
								<td>
								    {$vo.sendtime|date='Y-m-d H:i:s',###}
								</td>
                            </tr>
						</volist>
					<else />
						<tr><td colspan="5">----{:L('EMPTY_TPL_DATA')}----</td></tr>
					</notempty>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		//提交搜索
		$("#dosearch").click(function(){
			result = checkSearchForm();
			if(result){
				$("#act").val('search');
				$("#searchForm").submit();
			}
		});
	});
	$("#check_all").click(function(){
		$("input[class='check_list']").prop('checked', $(this).prop("checked"));
	});
	$('#delete').click(function(){
		$("#form1").attr('action', '{:U("Setting/delete")}');
		$("#form1").submit();
	});
</script>
<include file="Public:footer" />